<?php

namespace App\Http\Requests\Admin\Customer;

use App\Http\Requests\ApiRequest;
use Illuminate\Foundation\Http\FormRequest;

/**
 * @property string keyword
 * @property string per_page
 */
class StaffIndexRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'keyword'  => 'nullable|string',
            'order_by' => 'nullable|string',
            'sort'     => 'nullable|string|in:desc,asc',
        ];
    }

    /**
     * @return array
     */
//    public function messages()
//    {
//        return [
//            'keyword.*'  => '超管名称必须是字符串',
//            'order_by.*' => '排序的字段必须是字符串',
//            'sort.*'     => '排序的规则值必须是desc或asc'
//        ];
//    }
}
